package com.avantis.admin.config.shiro;


import com.avantis.common.entity.AdminUser;

public class CurrentUser {

    private static final ThreadLocal<AdminUser> LOCAL=new ThreadLocal<AdminUser>();

    private CurrentUser(){

    }

    public static void setUser(AdminUser user){
        LOCAL.set(user);
    }

    public static AdminUser get(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }
}
